public class Student {
    //属性(字段，feld)
    String studentNo;
    String studentName;
    int age;
    String studentEducation;

    //行为
    public void learn() {
        System.out.println("好好学习！");
    }

    //构造器：初始化变量
    //与类名相同
    public Student() {
        this.studentNo = "01";
/*        this.studentName = "小明";
        this.age = 50;
        this.studentEducation = "本科";*/
    }

    public Student(String studentNo, String studentName, int age, String studentEducation) {
        //调用上面的构造器,只能放在第一行
        this();
        this.studentName = studentName;
        this.age = age;
        this.studentEducation = studentEducation;
    }
}

